var columns = [
    [
        {field: 'jc', title: '公司名称', width: 100,align: 'center'},
        {field: 'name', title: '物资名称', width: 100,align: 'center'},
        {field: 'ggxh', title: '规格型号', width: 100,align: 'center'},
        {field: 'code', title: '规格代码', width: 100,align: 'center'},
//        {field: 'kcsl', title: '库存数量', width: 100},
//        {field: 'kcje', title: '库存金额', width: 100, formatter:function(value){
//            var sl = formatJe(value,",");
//            return sl;
//        }
//        },
        {field: 'ydcb', title: '移动成本', width: 100, formatter:function(value){
            var sl = formatJe2(value,",");
            return sl;
        },align: 'right'
        }
    ]
];



$(function () {
    $("#ydcb_gsId").gsjgtree(1);
        $("#grid_ydcb").datagrid({
            url:$.webPath() + "/report/ydcb/ydcbList",
            toolbar:"#ydcb_toolbar",
            pagination: true,
            rownumbers: true,
            singleSelect: true,
            collapsible: true,
            fit: true,
            fitColumns: true,
            pageNumber: 1,
            columns:columns
        });





    //查询按钮
    $("#btn_ydcb_search").click(function () {
        ydcb_search();
    });



});




//查询票据
function ydcb_search() {
    $('#grid_ydcb').datagrid('load',
        {
            gsId:  $("#ydcb_gsId").combotree("getValue"),
            ggxh:  $("#ydcb_ggxh").val(),
            name:  $("#ydcb_name").val(),
            code:  $("#ydcb_code").val()
        }
    );
}